<template>
  <div v-loading="true" style="width:100vw;height:100vh"></div>
</template>

<style lang="less">
// @import '../login/index';
</style>

<script>
import authUtils from '@/utils/authUtils'

export default {
  data() {
    // 变量定义
    return {
      // 账户名
      userName: '',
      // 密码
      passwd: '',
      // 权限菜单
      rolesMenu: '',
      loadding: false,
      limits: false
    }
  },
  async mounted() {
    await this.authLogin()
  },
  methods: {
    /**
     * 统一认证登录
     */
    async authLogin() {
      const loginInstance = authUtils.getInstance({ vm: this })
      // 登陆回调
      const callback = async() => {
        // await loginInstance.getUserData()
        sessionStorage.setItem('is_runtime_login', 'true')
        await authUtils.goRediect({ vm: this })
      }
      await loginInstance.login(callback)
    }
  }
}
</script>
